#include<stdio.h>
#include<string.h>
#define BLOCK_SIZE 512
void print(char *);

void main()
{
printf("Enter string\n");
print("folder1/folder2/");

}


void print(char *path)
{	
int i=0;
char dir[10];
printf("\nlength:%d\n",strlen(path));

while((*path)!='\0')
	{
		i=0;
		while((*path)!='/')
		{
			dir[i]=*path;
			path++;
			i++;			
		}	
		dir[i]='\0';
		path++;	
	printf("\n%s\n",dir);
	}
}


/*
char array[16], *name;
fseek(fp,sizeof(struct main_header) ,0);
fscanf(fp,"%s",array);
//getline(array,)
char a[100];
//fgets(array,16,fp);
printf("\n%s",array);
printf("\njdkjflk");
printf("\njdkjflk\n");
scanf("%d",&a);
//puts("going into while");
while(1);*/
